package com.company.mediaplayer;

import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;

/**
 * Created by 33793 on 2016/3/17.
 */
public class MusicFilter implements FilenameFilter{
    @Override
    public boolean accept(File dir, String filename) {
        return (filename.endsWith(".mp3"));//返回当前目录所有以.mp3结尾的文件
    }
}
